import React from 'react';
import { Route, Link } from 'react-router-dom';
import Home from './components/Home';
import Detail from './components/Detail';
export default function App() {
  return (
    <div>
      App
      <hr />
      <h3>链接:</h3>
      <> &nbsp; </>
      <Link to="/Home">去Home</Link>
      <> &nbsp;&nbsp;&nbsp; </>
      <Link to="/Detail">去Detail</Link>
      {/* 展示一级路由的视图 */}
      <Route path="/Home" component={Home}></Route>
      <Route path="/Detail" component={Detail}></Route>
      {/* 二级路由是嵌套在一级路由中的,所以去一级路由对应的组件里面配置二级路由 */}
    </div>
  );
}
